<?php
// 本类由系统自动生成，仅供测试用途
class ContentAction extends Action {
	public function zhuanti_content(){
	//专题研究
		$id=$_GET['id'];
		$c=M('zhuanti');	
		// $content = $c->where('urid='.$id)->select();
		$urid = $c->where('urid='.$id)->select();
		$coids = $urid[0]['urls'];
		if(preg_match("/(htm)/is",$coids)){
			$begin=strrchr($coids,'-');
			$length=strpos($begin,'_');
			$coid=substr($begin,1,$length-1);
			
		}
		else{
			$begin=strstr($coids,'=');
			$length=strpos($begin,'&');
			$coid=substr($begin,1,$length-1);
		}
		$m=M('content');
		$content = $m->where('coid='.$coid)->select();
		$this->assign('content',$content)->assign('id',$id);
	//导航栏
		$nav = new PublicAction();
		$nav->base();
		//相关阅读
		$nav->reading();
	//专题研究内容页
		$this->display();
	}
	public function content(){
	     $c=M('content');
		 $id['coid']=$_GET['id'];
		 $list = $c->where($id)->select();
		 $map['clid'] = $list[0]['clid'];
		 $t=M('class');
		 $term = $t->where($map)->select();
		 $this->assign('content',$list)->assign('term',$term);
	//导航栏
		$nav = new PublicAction();
		$nav->base();
		//相关阅读
		$nav->reading();
		 if($list[0]['clid']== 3 || $list[0]['clid']== 4 || $list[0]['clid']== 5 || $list[0]['clid']== 6 || $list[0]['clid']== 7 || $list[0]['clid']== 8 ){
		 if($list[0]['clid']== 6 ){
			$classid = $list[0]['coid'];
			$this->assign('classid',$classid);
		 }
		 $this->display('news_content');
		 }else{
		 $this->display('content');
		 }
		 
		 
		 
		 
		 
	
	}
	
}